<div class="blog-header">
  <h1 class="blog-title">阿鑫的博客</h1>
  <p class="lead blog-description">learning Rails.........</p>
</div>

<div class="row">

  <div class="col-sm-8 blog-main">

    <% @posts.each do |post| %>
      <div class="blog-post">
        <h2 class="blog-post-title"><%= post.title %></h2>
        <p class="blog-post-meta">
          <%= l post.published_at %> by <%= post.author %>
          <br>
          <% post.categories.reload.each do |category| %>
            <span class="label label-default"><%= category.name %></span>
          <% end %>
        </p>

        <%= sanitize post.content %>
      </div><!-- /.blog-post -->
    <% end %>
<!--
    <nav>
      <ul class="pager">
        <li><a href="#">Previous</a></li>
        <li><a href="#">Next</a></li>
      </ul>
    </nav>
 -->
  </div><!-- /.blog-main -->

  <div class="col-sm-3 col-sm-offset-1 blog-sidebar">
    <div class="sidebar-module sidebar-module-inset">
      <h4>About Me</h4>
      <p>一个热爱开源，热爱技术的程序猿！</p>
    </div>
    <div class="sidebar-module">
      <h4>Archives</h4>
      <ol class="list-unstyled">
        <li><a href="#">March 2020</a></li>
        <li><a href="#">February 2020</a></li>
        <li><a href="#">January 2020</a></li>
        <li><a href="#">December 2020</a></li>
        <li><a href="#">November 2020</a></li>
        <li><a href="#">October 2020</a></li>
        <li><a href="#">September 2020</a></li>
        <li><a href="#">August 2020</a></li>
        <li><a href="#">July 2020</a></li>
        <li><a href="#">June 2020</a></li>
        <li><a href="#">May 2020</a></li>
        <li><a href="#">April 2020</a></li>
      </ol>
    </div>
    <div class="sidebar-module">
      <h4>Elsewhere</h4>
      <ol class="list-unstyled">
        <li><a href="#">GitHub</a></li>
        <li><a href="#">Twitter</a></li>
        <li><a href="#">Facebook</a></li>
      </ol>
    </div>
  </div><!-- /.blog-sidebar -->

</div><!-- /.row -->
